package com.bjpowerrnode.doubleMaoHao.Test1;

import java.util.function.BiFunction;
import java.util.function.Consumer;

public class Test {
    public static void main(String[] args) {
        //访问静态方法
        IConvert<String, String> startsWith = Something::startsWith;
        String result = startsWith.convert("Java");
        System.out.printf("startsWith:%s\n",result);

        //访问对象方法
        Something something = new Something();
        IConvert<String, String> endWith = something::endWith;
        result  = endWith.convert("Java");
        System.out.printf("endWith:%s\n",result);

        //访问构造方法
        IConvert<String, Something> stringSomethingIConvert = Something::new;
        Something constructors = stringSomethingIConvert.convert("constructors");
        System.out.println(constructors.endWith("Java"));
        System.out.println(constructors.startsWith("Java"));


    }
}
